var app = require('express')();
var http = require('http').Server(app);
var io = require('socket.io')(http);
const bodyParser = require('body-parser');
app.use(bodyParser.json());;//设置完毕之后，会在req对象上面新增一个req.body的一个对象
app.use(bodyParser.urlencoded({extended: false}));
require('./api.js').router(app);
require('./soketApi.js').run(io);
//router.router(app);



http.listen(3000, function(){
  console.log('listening on *:3000');
});